﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace LevelEditor.App.Serialization
{
    public class SDialog
    {

        private int id;
        [XmlElement("Id")]
        public int Id
        {
            get { return id; }
            set { id = value; }
        }

        private SLocation location;
        [XmlElement("Location")]
        public SLocation Location
        {
            get { return location; }
            set { location = value; }
        }

        private string title;
        [XmlElement("Title")]
        public string Title
        {
            get { return title; }
            set { title = value; }
        }

        private string trigger;
        [XmlElement("Trigger")]
        public string Trigger
        {
            get { return trigger; }
            set { trigger = value; }
        }

        private string character;
        [XmlElement("Character")]
        public string Character
        {
            get { return character; }
            set { character = value; }
        }

        private string text;
        [XmlElement("Text")]
        public string Text
        {
            get { return text; }
            set { text = value; }
        }

        private int idNextDialog;
        [XmlElement("IdNextDialog")]
        public int IdNextDialog
        {
            get { return idNextDialog; }
            set { idNextDialog = value; }
        }

        private string titleNextDialog;
        [XmlElement("TitleNextDialog")]
        public string TitleNextDialog
        {
            get { return titleNextDialog; }
            set { titleNextDialog = value; }
        }

        private bool isProject;
        [XmlElement("IsProject")]
        public string IsProject
        {
            get { return isProject.ToString(); }
            set
            {
                string v = value;
                isProject = Boolean.Parse(value);
            }
        }

        private int idProject;
        [XmlElement("IdProject")]
        public int IdProject
        {
            get { return idProject; }
            set { idProject = value; }
        }
    }
}
